﻿@model GameSchool.Models.ViewModels.RegistrationViewModel

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend class="Form">Notaðu formið að neðan til að breyta upplýsingum notanda</legend>

        @Html.HiddenFor(model => model.User_ID)

         <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SSN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SSN)
            @Html.ValidationMessageFor(model => model.SSN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Address)
            @Html.ValidationMessageFor(model => model.Address)
        </div>

        <div class="editor-label">
           @Html.LabelFor(model => model.Phone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Phone)
            @Html.ValidationMessageFor(model => model.Phone)
        </div>

        <div class="editor-label">
           @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
           @Html.Label("Tegund")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Role_ID, ViewData["Roles"] as List<SelectListItem>)
            @Html.ValidationMessageFor(model => model.Role_ID)
        </div>

        <p>
            <input class="SaveChanges" type="submit" value="Vista" />
        </p>
    </fieldset>
}

